﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Abhar.web.src;

namespace Abhar.web
{
    public partial class News : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                if (this.GetCurrentLanguage() == Language.Arabic)
                    this.rptNews.DataSource = DatabaseContext.Current.News.GetTopXArabic(5);
                else
                    this.rptNews.DataSource = DatabaseContext.Current.News.GetTopXEnglish(5);

                this.rptNews.DataBind();
            }
        }
    }
}